﻿@{
    Layout = null;
}
@using CNKI.TPI.Web.Base;
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>信息资源建设与管理平台6.5</title>

    @Styles.Render("~/Content/admin/style/css")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/admin/js")
    @Styles.Render("~/Content/dhtmlxTree/css")
    @Scripts.Render("~/Content/dhtmlxTree/js")
    @Scripts.Render("~/Scripts/admin/DateInput/WdatePicker.js")
    @Styles.Render("~/Content/autocomplete/jquery-ui.css")

    <style>
        /*重写提示框样式*/
        .ui-dialog .ui-dialog-titlebar {
            padding: 3px;
        }

        .ui-dialog .ui-dialog-buttonpane {
            margin: 0px;
            padding: 0px;
        }

        .ui-dialog-title {
            padding-left: 5px;
        }
        /*改变标题颜色*/
        .ui-widget-header {
            background-color: #107bce;
            border: 1px solid #107bce;
            background-image: none;
        }

        .ui-front {
            z-index: 999999999;
        }

        .wrap {
        }
    </style>
    <script>
        $(function () {
            //页面初始化，根据首页传的地址，异步加载右侧部分
            ajaxLoad("initload", '@ViewBag.UrlStr', "");
        })
        //上移
        function moveablove() {
            var len = $(".ulfield li input:checked").length;
            if (len < 1)
                return;
            $.each($(".ulfield li input:checked"), function () {
                var onthis = $(this).parent().parent();
                var getUp = onthis.prev();
                //if ($(getUp).has("input").size() == 0) {
                //    messageAlert("顶级元素不能上移");
                //    return;
                //}
                $(onthis).after(getUp);
            });
        }
        //下移
        function movedown() {
            var len = $(".ulfield li input:checked").length;
            if (len < 1)
                return;
            $.each($(".ulfield li input:checked"), function (index, item) {
                var onthis = $(".ulfield li input:checked:eq(" + (len - index - 1) + ")").parent().parent();//倒序下移，正序下移不能一次下移多个
                var getdown = onthis.next();
                $(getdown).after(onthis);
            });
        }
        //移到顶部

        function movefirst() {
            var len = $(".ulfield li input:checked").length;
            if (len < 1)
                return;
            $.each($(".ulfield li input:checked"), function () {
                var onthis = $(this).parent().parent().parent();
                onthis.prepend($(this).parent().parent());
            });
        }
        //移到底部

        function movelast() {
            var len = $(".ulfield li input:checked").length;
            if (len < 1)
                return;
            $.each($(".ulfield li input:checked"), function () {
                var onthis = $(this).parent().parent().parent();
                onthis.append($(this).parent().parent());
            });
        }
    </script>
</head>
<body>

    <!-- headerStart -->
    <div class="header">
        <div class="header-in clearfix">
            <div class="fl">
                <a href="http://www.cnki.net" class="logo fl">
                    <img src="~/Content/admin/images/logo.png" alt="" /></a>
                <span class="header-line fl"></span>
                <h1 class='fl'>用户个人中心</h1>
            </div>
            <div class="fr">
                <div class="header-r">
                    @{ 
                        bool anonymousControlFlag = CNKI.TPI.Web.Base.ConfigHelper.IsAnonymousControlEnabled();
                        string anonymousUsername = CNKI.TPI.Web.Base.ConfigHelper.GetAnonymousAccount();
                        string currentUsername = "";
                        if (CNKI.TPI.Web.Base.SessionHelper.IsUserInfoExsit())
                        {
                            currentUsername = CNKI.TPI.Web.Base.SessionHelper.GetUserInfo().UserCode;
                        }
                    }

                    @if (CNKI.TPI.Web.Base.SessionHelper.IsUserInfoExsit() && ((anonymousControlFlag && !anonymousUsername.Equals(currentUsername)) || !anonymousControlFlag))
                    {
                        CNKI.TPI.Web.Search.Model.LoginUserInfo userInfo = CNKI.TPI.Web.Base.SessionHelper.GetUserInfo();
                        string username = string.IsNullOrEmpty(userInfo.UserName) ? userInfo.UserCode : userInfo.UserName;
@*<img class='inline-block vam mr10' src="~/Content/admin/images/tx.png" alt="" />*@
                        @Html.Raw(@username + " 您好！  ")
                        @Html.ActionLink("返回首页", "Index", "Home", routeValues: null, htmlAttributes: new { id = "loginLink" })
                        <a class='ml20' href="javascript:document.getElementById('logoutForm').submit()">注销</a>
                        using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
                        {
                        @Html.AntiForgeryToken()
                        
                        }
                    }
                    else
                    {
                        <div>
                            @*@Html.ActionLink("注册", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })*@
                            @Html.ActionLink("登录", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
    <!-- headerEnd -->

    <!-- conStart -->
    <div class="wrap con posr">

        <!-- wrapLStart -->
        <div class="wrapL">
            <div id="loading" style="display: none; margin: 600px; margin-top: 200px; position: absolute">
                <img src="~/Images/loading.gif" width="50" />
            </div>
            <dl>
                <dt><span style="cursor: pointer;">我的历史</span><i class="inline-block vam close"></i></dt>
                <dd class="hidden">
                    <ul>
                        @{
                            string strclass = "";
                            string strli = "";
                            string posa = "";
                            if (ViewBag.UrlStr.Contains("/UserCenter/SearchHistory") || ViewBag.UrlStr.Contains("/UserCenter/UserCenterIndex")) //如果没有带菜单参数则默认选中检索历史
                            {
                                strclass = "class=cur";
                                strli = "class=posr";
                                posa = "<i class='inline-block posa'></i>"; //页面标签样式
                            }
                        }
                        <li @strli>
                            <a @strclass href="javascript:void(0)" onclick="ajaxLoad(this,'@Html.Raw(Url.Action("SearchHistory", "UserCenter"))')"><span>检索历史</span></a>
                            @Html.Raw(posa)
                        </li>
                        @{
                            strclass = "";
                            strli = "";
                            posa = "";
                            if (ViewBag.UrlStr.Contains("/UserCenter/ViewHistory"))
                            {
                                strclass = "class=cur";
                                strli = "class=posr";
                                posa = "<i class='inline-block posa'></i>";
                            }
                        }
                        <li @strli>
                            <a  @strclass href="javascript:void(0)" onclick="ajaxLoad(this,'@Html.Raw(Url.Action("ViewHistory", "UserCenter"))')"><span>浏览历史</span></a>
                            @Html.Raw(posa)
                        </li>
                          @{
                            strclass = "";
                            strli = "";
                            posa = "";
                            if (ViewBag.UrlStr.Contains("/UserCenter/DownHistory"))
                            {
                                strclass = "class=cur";
                                strli = "class=posr";
                                posa = "<i class='inline-block posa'></i>";
                            }
                        }
                        <li @strli>
                            <a  @strclass href="javascript:void(0)" onclick="ajaxLoad(this,'@Html.Raw(Url.Action("DownHistory", "UserCenter"))')"><span>下载历史</span></a>
                            @Html.Raw(posa)
                        </li>
                    </ul>
                </dd>
            </dl>
            <dl>
                <dt><span style="cursor: pointer;">我的收藏</span><i class="inline-block vam close"></i></dt>
                <dd class="hidden">
                    <ul>


                        <li>
                            <a href="javascript:void(0)" onclick="ajaxLoad(this,'@Html.Raw(Url.Action("FavFolder", "UserCenter"))')"><span>收藏列表</span></a>
                        </li>

                        <li>
                            <a href="javascript:void(0)" onclick="ajaxLoad(this,'@Html.Raw(Url.Action("ManagerCategoryIndex", "UserCenter"))')"><span>管理分类</span></a>
                        </li>


                    </ul>
                </dd>
            </dl>

        </div>
        <!-- wrapLEnd -->

        <!-- wrapRStart -->

        <div class="wrapR">
        </div>

        <!-- wrapREnd -->

    </div>

    <!-- conEnd -->
        <input type="hidden" id="UrlStr" name="UrlStr" value="@ViewBag.UrlStr" />
    <!-- footerStart -->
    <div class="footer tc posa">同方知网数字技术股份有限公司 </div>
    <!-- footerEnd -->
    @*操作提示框*@
    <div id="dialog-confirm" title="操作提示">
        <p></p>
    </div>
    @*消息提示框*@
    <div id="dialog-message" title="消息提示">
        <p></p>
    </div>
</body>
</html>
